package com.yboot.starter.holiday;

import de.jollyday.Holiday;
import de.jollyday.HolidayManager;
import de.jollyday.ManagerParameter;
import de.jollyday.ManagerParameters;
import org.springframework.cglib.core.Local;

import java.time.LocalDate;
import java.util.Locale;
import java.util.Set;

/**
 * 功能描述
 *
 * @author yangcs
 * @date 2025/8/6
 */
public class Simple {
    public static void main(String[] args) {
        ManagerParameter managerParameter = ManagerParameters.create(Locale.CHINA);
        HolidayManager holidayManager = HolidayManager.getInstance(managerParameter);
        // HolidayManager holidayManager = HolidayManager.getInstance(ManagerParameters.create("CN"));
        LocalDate date = LocalDate.now();
        Set<Holiday> holidays = holidayManager.getHolidays(date.getYear());
        for (Holiday holiday : holidays) {
            System.out.println(holiday.getDate()+ "-" + holiday.getDescription());
        }
    }
}
